package com.jarveis.frame.jdbc.handler;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;

import com.jarveis.frame.jdbc.ResultSetHandler;

/**
 * 单个值的结果集
 * 
 * @author liuguojun
 */
public class ValueListHandler implements ResultSetHandler {

	@Override
	public Object handle(ResultSet rs) throws SQLException {
		ArrayList<Object> result = new ArrayList<Object>();
		
		while (rs.next()) {
			Object object = rs.getObject(1);
			result.add(object);
		}

		return result;
	}

}
